Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 3 - Endpoints / Endpoints Reference
Functions / Tearing Down a Connection


OTSndOrderlyDisconnect

Initiates or completes an orderly disconnection.

C INTERFACE
OSStatus OTSndOrderlyDisconnect(EndpointRef ref);
C++ INTERFACE
OSStatus TEndpoint::SndOrderlyDisconnect();
PARAMETERS
ref
The endpoint reference of the endpoint initiating the orderly disconnect.
DESCRIPTION
You call the OTSndOrderlyDisconnect function to initiate an orderly release of a connection and to indicate to the peer endpoint that you have no more data to send. After calling this function, you must not send any more data over the connection. However, you can still continue to receive data if the peer endpoint has not yet called the OTSndOrderlyDisconnect function.

This function is a service that is not supported by all protocols. If it is supported, the servtype field of the TEndpointInfo structure has the value T_COTS_ORD or T_TRANS_ORD.

The OTSndOrderlyDisconnect function behaves exactly the same in all modes
of operation.

VALID STATES
T_DATAXFER, T_INREL

SEE ALSO
To send an abortive disconnect or to reject a connection request, you call the OTSndDisconnect function (page 3-149).

For information on abortive and orderly disconnects, see "Terminating a Connection," beginning on page 3-30.

You examine the TEndpointInfo structure (page 3-48) to determine whether the endpoint supports orderly release.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996